package com.android.topview.watermelon

import android.content.Intent
import android.os.Bundle
import android.view.View
import com.android.topview.watermelon.account.activity.AccountActivity
import com.android.topview.watermelon.base.BaseActivity
import com.android.topview.watermelon.exchange.ExchangeActivity
import com.android.topview.watermelon.util.setTalkBackFocus
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        initListener()
    }

    private fun initListener() {
        iv_add_account_back.setOnClickListener {
            finish()
        }

        btn_main_exchange.setOnClickListener {
            startActivity(Intent(this, ExchangeActivity::class.java))
        }

        btn_main_account.setOnClickListener {
            startActivity(Intent(this, AccountActivity::class.java))
        }

        tv_main_title.setTalkBackFocus()
    }

}